package com.linln.modules.system.domain;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "Patient_Birth_Situation", schema = "dbo", catalog = "WQR")
@EntityListeners(AuditingEntityListener.class)
public class PatientBirthSituationEntity {
    private Integer id;
    private String zyh;
    private String gp;
    private String myqqk;
    private String wcqqk;
    private String csqk;
    private String shqk;
    @CreatedDate
    private Date createDate;
    private String bah;
    private Date cyrq;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "zyh", nullable = true, length = 20)
    public String getZyh() {
        return zyh;
    }

    public void setZyh(String zyh) {
        this.zyh = zyh;
    }

    @Basic
    @Column(name = "GP", nullable = true, length = 50)
    public String getGp() {
        return gp;
    }

    public void setGp(String gp) {
        this.gp = gp;
    }

    @Basic
    @Column(name = "myqqk", nullable = true, length = 2000)
    public String getMyqqk() {
        return myqqk;
    }

    public void setMyqqk(String myqqk) {
        this.myqqk = myqqk;
    }

    @Basic
    @Column(name = "wcqqk", nullable = true, length = 2000)
    public String getWcqqk() {
        return wcqqk;
    }

    public void setWcqqk(String wcqqk) {
        this.wcqqk = wcqqk;
    }

    @Basic
    @Column(name = "csqk", nullable = true, length = 2000)
    public String getCsqk() {
        return csqk;
    }

    public void setCsqk(String csqk) {
        this.csqk = csqk;
    }

    @Basic
    @Column(name = "shqk", nullable = true, length = 2000)
    public String getShqk() {
        return shqk;
    }

    public void setShqk(String shqk) {
        this.shqk = shqk;
    }

    @Basic
    @Column(name = "createDate")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "cyrq", nullable = true)
    public Date getCyrq() {
        return cyrq;
    }

    public void setCyrq(Date cyrq) {
        this.cyrq = cyrq;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PatientBirthSituationEntity that = (PatientBirthSituationEntity) o;
        return id == that.id && Objects.equals(zyh, that.zyh) && Objects.equals(gp, that.gp) && Objects.equals(myqqk, that.myqqk) && Objects.equals(wcqqk, that.wcqqk) && Objects.equals(csqk, that.csqk) && Objects.equals(shqk, that.shqk) && Objects.equals(createDate, that.createDate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, zyh, gp, myqqk, wcqqk, csqk, shqk, createDate);
    }

    @Basic
    @Column(name = "bah", nullable = false, length = 20)
    public String getBah() {
        return bah;
    }

    public void setBah(String bah) {
        this.bah = bah;
    }
}
